/**
 * 对于全局插件，storybook在编译时会先去.storybook文件夹下执行preview文件。
  我们将全局样式与全局插件添加至这里：
 */

import React from 'react'
import { GlobalStyle } from '../src/components/shared/global'
import { addDecorator, addParameters } from '@storybook/react'
import { withA11y } from '@storybook/addon-a11y'

addParameters({
  options: { showRoots: true },
  dependencies: {
    withStoriesOnly: true,
    hideEmpty: true
  }
})

addDecorator(withA11y)
addDecorator(story => (
  <>
    <GlobalStyle />
    { story() }
  </>
))

// export const parameters = {
//   actions: { argTypesRegex: "^on[A-Z].*" },
// }